<!--
Template Author: W3layouts
Template Author URL: http://w3layouts.com
Template License: Creative Commons Attribution 3.0 Unported
Template License URL: http://creativecommons.org/licenses/by/3.0/
-->
<!DOCTYPE HTML>
<html>
<head>
	<title>{{=response.title or request.application}}</title>
	<meta name="viewport" content="width=device-width, initial-scale=1">
	<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
	<link rel="shortcut icon" href="{{=URL('static','images/favicon.ico')}}">
	<script type="application/x-javascript"> addEventListener("load", function() { setTimeout(hideURLbar, 0); }, false); function hideURLbar(){ window.scrollTo(0,1); } </script>
    <!-- Bootstrap CSS -->
    <link href="{{=URL('static','css/bootstrap.css')}}" rel='stylesheet' type='text/css' />
    <link href="{{=URL('static','css/bootstrap-table.min.css')}}" rel='stylesheet' type='text/css' />
    <!-- Custom CSS -->
    <link href="{{=URL('static','css/style.css')}}" rel='stylesheet' type='text/css' />
    <!-- font CSS -->
    <!-- font-awesome icons -->
    <link href="{{=URL('static','css/font-awesome.css')}}" rel="stylesheet">
    <!-- //font-awesome icons -->
    <!-- datetime picker -->
    <link href="{{=URL('static','css/jquery.datetimepicker.min.css')}}" rel='stylesheet' type='text/css' />
    <!-- //datetime picker -->
    <!-- js-->
    <script src="{{=URL('static','js/common/jquery-1.11.1.min.js')}}"></script>
    <script src="{{=URL('static','js/common/modernizr.custom.js')}}"></script>
    <!-- datetime picker -->
    <script src="{{=URL('static','js/common/jquery.datetimepicker.full.min.js')}}"></script>
    <!-- //datetime picker -->
    <!--webfonts-->
    <link href='//fonts.googleapis.com/css?family=Roboto+Condensed:400,300,300italic,400italic,700,700italic' rel='stylesheet' type='text/css'>
    <!--//webfonts-->
    <!--animate-->
    <link href="{{=URL('static','css/animate.css')}}" rel="stylesheet" type="text/css" media="all">
    <script src="{{=URL('static','js/common/wow.min.js')}}"></script>
	<script>
		 new WOW().init();
	</script>
    <!--//end-animate-->
    <!-- Metis Menu -->
    <script src="{{=URL('static','js/common/metisMenu.min.js')}}"></script>
    <script src="{{=URL('static','js/template/custom.js')}}"></script>
    <link href="{{=URL('static','css/custom.css')}}" rel="stylesheet">
	<!--//Metis Menu -->
	<!--validator js-->
    <script src="{{=URL('static','js/common/validator.min.js')}}"></script>
	<!--//validator js-->
    <!-- ZingChart -->
    <script src="{{=URL('static','js/charts/zingchart.min.js')}}"></script>
    <!-- //ZingChart -->
</head> 
<body class="cbp-spmenu-push">
	<div class="main-content">
        <!-- Menu ===================================== -->
		<!--left-fixed -navigation-->
		<div class=" sidebar" role="navigation">
            <div class="navbar-collapse">
				<nav class="cbp-spmenu cbp-spmenu-vertical cbp-spmenu-left" id="cbp-spmenu-s1">
                    {{include 'menu.html'}}
					<div class="clearfix"> </div>
					<!-- //sidebar-collapse -->
				</nav>
			</div>
		</div>

        <!-- Header =================================== -->
		<!--left-fixed -navigation-->
		<div class="sticky-header header-section ">
			<div class="header-left">
                <!--toggle button start-->
                <button id="showLeftPush">
                    <i class="fa fa-bars"></i>
                </button>
				<!--toggle button end-->
				<!--logo -->
				{{include 'logo.html'}}
				<!--//logo-->
				<div class="clearfix"> </div>
			</div>
			<div class="header-right">
				<!--notification menu end -->
                {{if session.logged:}}
				<div class="profile_details">		
					<ul>
						<li class="dropdown profile_details_drop">
							<a href="#" class="dropdown-toggle" data-toggle="dropdown" aria-expanded="false">
								<div class="profile_img">
									<div class="user-name">
										<p>{{=session.name}}</p>
										<span>{{=session.organization}}</span>
									</div>
									<i class="fa fa-angle-down lnr"></i>
									<i class="fa fa-angle-up lnr"></i>
									<div class="clearfix"></div>	
								</div>	
							</a>
							<ul class="dropdown-menu drp-mnu">
								<li><a href="/logout"><i class="fa fa-sign-out"></i> Logout</a> </li>
							</ul>
						</li>
					</ul>
				</div>
                {{else:}}
                <div class="login modal-grids">
                    <button type="button" class="btn btn-primary btn-lg" data-toggle="modal" data-target="#modalLogIn" data-whatever="logIn">LogIn</button>
                </div>
                {{pass}}
				<div class="clearfix"> </div>	
			</div>
			<div class="clearfix"> </div>	
		</div>

        <!-- Main content ============================= -->
		<div id="page-wrapper">
			<div class="main-page">
                {{block center}}
                {{include}}
                {{end}}
			</div>
            <div class="clearfix"> </div>
		</div>

        <!-- Footer =================================== -->
		<div class="footer">
		   <p>&copy; 2016 Novus Admin Panel. All Rights Reserved | Design by <a href="https://w3layouts.com/" target="_blank">w3layouts</a></p>
		</div>

	</div>

    <!-- Modals =================================== -->
    <div class="login modal-grids">
        <!-- Modal LogIn -->
        <div class="modal fade" id="modalLogIn" tabindex="-1" aria-labelledby=modalLogInLabel" style="display: none;" aria-hidden="true">
            <div class="modal-dialog" style="width: 30%;">
                <div class="modal-content">
                    <div class="modal-header">
                        <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">×</span></button>
                        <h4 class="modal-title" id="modalLogInLabel">LogIn</h4>
                    </div>
                    <form class="form-horizontal"data-toggle="validator" action="/login" method="post">
                        <div class="modal-body">
                            <input type="hidden" data-toggle="validator" class="form-control" placeholder="Password" name="current_page" value="{{=request.controller}}/{{=request.function}}" required>
                            <div class="form-group">
                                <label class="col-md-3 control-label">Username</label>
                                <div class="col-md-8">
                                    <input type="text" class="form-control" placeholder="Username" name="username"required>
                                </div>
                            </div>
                            <div class="form-group">
                                <label class="col-md-3 control-label">Password</label>
                                <div class="col-md-8">
                                    <input type="password" data-toggle="validator" class="form-control" placeholder="Password" name="password" required>
                                </div>
                            </div>
                        </div>
                        <div class="modal-footer">
                            <button type="button" class="btn btn-default" data-dismiss="modal">Cancel</button>
                            <button type="submit" class="btn btn-primary">LogIn</button>
                        </div>
                    </form>
                </div>
            </div>
        </div>
    </div>

    <!-- Javascript =============================== -->
	<!-- Classie -->
	<script src="{{=URL('static','js/common/classie.js')}}"></script>
	<script>
		var menuLeft = document.getElementById( 'cbp-spmenu-s1' ),
			showLeftPush = document.getElementById( 'showLeftPush' ),
			body = document.body;

		showLeftPush.onclick = function() {
			classie.toggle( this, 'active' );
			classie.toggle( body, 'cbp-spmenu-push-toright' );
			classie.toggle( menuLeft, 'cbp-spmenu-open' );
			disableOther( 'showLeftPush' );
		};
			
		function disableOther( button ) {
			if( button !== 'showLeftPush' ) {
				classie.toggle( showLeftPush, 'disabled' );
			}
		}
	</script>
    <!-- Datetime Picker -->
    <script>
        jQuery.datetimepicker.setLocale('en');
        jQuery('.datetimepicker').datetimepicker({
            format: 'Y-m-d H:i:s',
            step:15
        });
    </script>
    <!-- //Datetime Picker -->
    <!-- Charts Hacks -->
    <script src="{{=URL('static','js/charts/custom.js')}}"></script>
    <!-- //Charts Hacks
	<!--scrolling js-->
	<script src="{{=URL('static','js/common/jquery.nicescroll.min.js')}}"></script>
	<script src="{{=URL('static','js/template/scripts.js')}}"></script>
	<!--//scrolling js-->
	<!-- Bootstrap JavaScript -->
    <script src="{{=URL('static','js/common/bootstrap.js')}}"> </script>
    <script src="{{=URL('static','js/common/bootstrap-table.min.js')}}"> </script>
    <!-- //Bootstrap JavaScript -->
</body>
</html>